# Maintainer: Antonio Rojas <arojas@archlinux.org>

pkgname=scip
pkgver=8.0.3
pkgrel=2
pkgdesc='Solving Constraint Integer Programs'
arch=(loong64 x86_64)
url='https://www.scipopt.org/'
license=(Apache)
depends=(tbb mpfr)
makedepends=(cmake boost soplex papilo)
source=(https://github.com/scipopt/scip/archive/v${pkgver//./}/$pkgname-$pkgver.tar.gz)
sha256sums=('fe7636f8165a8c9298ff55ed3220d084d4ea31ba9b69d2733beec53e0e4335d6')

build() {
  cmake -B build -S $pkgname-${pkgver//./} \
    -DCMAKE_INSTALL_PREFIX=/usr \
    -DCMAKE_BUILD_TYPE=RelWithDebInfo \
    -DAUTOBUILD=ON
  cmake --build build
}

package() {
  DESTDIR="$pkgdir" cmake --install build

# Remove bundled bliss
  rm -r "$pkgdir"/usr/{bin/bliss,include/bliss,lib/{libbliss.a,cmake/Bliss}}
}
